<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        img{
            position: absolute;
            left: 50%;
            transform: translate(-50%,-50%);
            top: 40%;
        }
        p{
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%,-50%);
            font-size: 36px;
        }
    </style>
</head>
<body>
{if $code==200}
<img src="__HOME_IMG__/chengg.png"  />
{else}
<img src="__HOME_IMG__/error.png"  />
{/if}
</body>
<script type="text/javascript" src="__HOME_JS__/jquery.3.3.1.min.js"></script>
<script type="text/javascript" src="__HOME_LAYUI__/layui.all.js"></script>
<script>
    setTimeout(function () {
        var action = "{$action}";
        if(action){
//            console.log(action);
            window.location.href = "{:url($action)}";
        }else{
            var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引

            parent.layer.close(index); //再执行关闭
        }
    },500);
</script>
</html>